package com.hulizuofang.wol.chat.client.action;

import java.io.Serializable;
import java.util.Set;

import com.gwtplatform.dispatch.shared.Result;
import com.hulizuofang.wol.chat.client.ui.user.ChatUser;

public class SetLoginResult implements Result, Serializable {
	private static final long serialVersionUID = 1L;
	private ChatUser user;
	private Set<ChatUser> onlineUser;

	SetLoginResult() {/* GWT only */}
	
	public SetLoginResult(ChatUser user, Set<ChatUser> onlineUser) {
		this.user = user;
		this.onlineUser = onlineUser;
	}

	public void workResult(SetLoginResultWorker setLoginResultWorker) {
		setLoginResultWorker.work(user,onlineUser);
	}
	
	public interface SetLoginResultWorker {
		void work(ChatUser user, Set<ChatUser> onlineUser);
	}
}
